package core;

import java.util.ArrayList;

public class Main {
    
    public static void main(String[] args) {
        Parser.parse("input.txt");
        ArrayList<int[]> individuals = new ArrayList<int[]>();
        individuals = Genetic.CreateIndividuals(100, Factory.getInstance().WORK_HOUR, Factory.getInstance().getAllRentableMachines());
        System.out.println("Before:");
        Genetic.printIndividu(individuals);
        individuals = Genetic.CrossoverMutateIndividuList(individuals);
        System.out.println("");
        System.out.println("After:");
        Genetic.printIndividu(individuals);
        /*int[] individu1 = Genetic.createRandomIndividu(Factory.getInstance().WORK_HOUR, Factory.getInstance().getAllRentableMachines());
        int[] individu2 = Genetic.createRandomIndividu(Factory.getInstance().WORK_HOUR, Factory.getInstance().getAllRentableMachines());
        System.out.print("Individu 1:");
        for(int a : individu1) {
            Output.getInstance().print(a + " "); 
        }
        Output.getInstance().println("");
        System.out.print("Individu 2:");
        for(int a : individu2) {
            Output.getInstance().print(a + " "); 
        }
        Output.getInstance().println("");
        Genetic.CrossoverMachine(individu1, individu2);
        System.out.print("Individu 1(cross):");
        for(int a : individu1) {
            Output.getInstance().print(a + " "); 
        }
        Output.getInstance().println("");
        System.out.print("Individu 2(cross):");
        for(int a : individu2) {
            Output.getInstance().print(a + " "); 
        }
        Output.getInstance().println("");     */
    }
    
}
